package com.dcrzl.gazgmh.module.common.mh.controller;

import com.dcrzl.gazgmh.common.entity.mh.MhMenu;
import com.dcrzl.gazgmh.common.utils.PageInfo;
import com.dcrzl.gazgmh.common.utils.Result;
import com.dcrzl.gazgmh.module.mh.service.MhMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 菜单管理
 *
 * @author dcrzl
 * @email 1728795786@qq.com
 * @date 2024-11-24 15:50:55
 */
@RestController
@RequestMapping("/common/mh/menu")
public class CommonMhMenuController {
    @Autowired
    private MhMenuService mhMenuService;

    /**
     * 列表
     */
    @GetMapping("/list")
    public Result<List<MhMenu>> list(MhMenu mhMenu){
       return mhMenuService.selectList(mhMenu);
    }

    /**
    * 列表分页
    */
    @GetMapping("/page")
    public PageInfo<MhMenu> page(MhMenu mhMenu){
        return mhMenuService.selectPage(mhMenu);
    }

    /**
     * 信息
     */
    @GetMapping("/info/{id}")
    public Result<MhMenu> info(@PathVariable("id") Long id){
		return mhMenuService.selectById(id);
    }



}
